home *** CD-ROM | disk | FTP | other *** search
- on pictload pictno
- set pictnam to pathName() & "PICT:" & pictno
- set vpictobject to fileio(mnew, "read", pictnam)
- if objectp(vpictobject) then
- set the name of cast 200 to pictno
- set the picture of cast pictno to vpictobject(mreadpict)
- vpictobject(mdispose)
- else
- alert("ERROR:" & vpictobject)
- end if
- end
-
- on pictset spno, spnum, typeno, inkno, vh, vv
- puppetSprite(spno, 1)
- set the type of sprite spno to typeno
- set the ink of sprite spno to inkno
- set the castNum of sprite spno to the number of cast spnum
- set the locH of sprite spno to vh
- set the locV of sprite spno to vv
- updateStage()
- end
-
- on playcheck spno
- if the movieTime of sprite spno >= the duration of cast the castNum of sprite spno then
- return 1
- else
- return 0
- end if
- end
-
- on puppetclear
- global gselect
- repeat with i = 1 to 24
- puppetSprite(i, 0)
- end repeat
- end
-
- on pushbutton
- set cname to item 1 of the name of cast the castNum of sprite clickOn()
- repeat while stillDown()
- if rollOver(clickOn()) then
- set the castNum of sprite clickOn() to the number of cast (cname & ",DWN")
- set rdata to 1
- else
- set the castNum of sprite clickOn() to the number of cast (cname & ",UPP")
- set rdata to 0
- end if
- updateStage()
- end repeat
- set the castNum of sprite clickOn() to the number of cast (cname & ",UPP")
- updateStage()
- return rdata
- end
-
- on savefile str
- set myobj to fileio(mnew, "?write", EMPTY)
- if objectp(myobj) then
- myobj(mwritestring, str)
- myobj(msetfinderinfo, "Dtxt", "MMPB")
- myobj(mdispose)
- return 1
- else
- if myobj <> -43 then
- alert(" can't file create :" & fileio(merror, myobj))
- end if
- end if
- return 0
- end
-
- on lodfile
- global gloadpoint
- set myobj to fileio(mnew, "?read", "TEXT")
- if objectp(myobj) then
- set gloadpoint to myobj(mreadfile)
- myobj(mdispose)
- return 1
- else
- if myobj <> -43 then
- alert("can't file open " & fileio(merror, myobj))
- end if
- end if
- return 0
- end
-
- on cursorctl spno, stype
- if rollOver(spno) then
- cursorset(spno, stype)
- else
- cursorset(spno, 0)
- end if
- end
-
- on cursorset spno, stype
- if stype = "S" then
- set the cursor of sprite spno to [804, 811]
- else
- if stype = 0 then
- set the cursor of sprite spno to -1
- end if
- end if
- end
-
- on playmovie
- puppetSprite(4, 0)
- puppetSprite(5, 1)
- puppetSprite(6, 0)
- set the castNum of sprite 5 to the number of cast "PLAY,DWN"
- set the movieRate of sprite 7 to 1
- end
-
- on ffmovie
- puppetSprite(4, 0)
- puppetSprite(5, 0)
- puppetSprite(6, 1)
- set the castNum of sprite 6 to the number of cast "FF,DWN"
- set the movieRate of sprite 7 to 2
- end
-
- on stmovie
- puppetSprite(4, 1)
- puppetSprite(5, 0)
- puppetSprite(6, 0)
- set the castNum of sprite 4 to the number of cast "PAUSE,DWN"
- set the movieRate of sprite 7 to 0
- end
-
- on soundset
- set cname to item 2 of the name of cast the castNum of sprite clickOn()
- if cname = "UPP" then
- puppetSprite(3, 1)
- set the castNum of sprite 3 to the number of cast "SOUND,DWN"
- set the volume of sprite 7 to 255
- else
- puppetSprite(3, 0)
- set the volume of sprite 7 to 0
- end if
- end
-
- on clearpuppet
- repeat with i = 1 to 24
- puppetSprite(i, 0)
- end repeat
- end
-